<?php
/**
 * https://gitee.com/Mao02
 * http://www.dazhetu.cn/
 * jay_fun 410136330@qq.com
 * Date: 2018/10/13 0013
 * Time: 20:34
 */

namespace app\blog\controller;

use think\Controller;
use app\common\model\content\Music as MusicModel;
use think\facade\Request;

class Music extends Controller
{
    public function index()
    {
        return json(MusicModel::all()->toArray());
    }

    public function lrc()
    {
        $id = Request::route('id');
        $data = [
            'data'=>MusicModel::field('lrc')->where('id',$id)->value('lrc'),
            'message'=>"操作成功！",
            'status'=>200
        ];
        return json($data);
    }
}